﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ProcessRoll.Models
{
    public class ProcessInstance : EntityBase
    {
        public virtual Process Process { get; set; }
        public int? ProcessID { get; set; }

        public int? ApplyMsgID { get; set; }
        public virtual ApplyMsg ApplyMsg { get; set; }

        public List<ActivityInstance> ActivityInstances { get; set; }

        public List<FieldInstance> FieldInstances { get; set; }
    }

    public class ActivityInstance : EntityBase
    {
        public int? ExameApproveID { get; set; }
        public virtual ExameApprove ExameApprove { get; set; }

        public virtual ProcessInstance ProcessInstance{ get;set;}
        public int? ProcessInstanceID{get;set;}

        //public virtual Process Process { get; set; }
        //public int? ProcessID { get; set; }

        public int? ActivityID { get; set; }
        public Activity Activity { get; set; }
       
    }

    public class FieldInstance : EntityBase
    {
        public string FieldName{get;set;}
        public string FieldValue { get; set; }

        public virtual ExameApprove ExameApprove { get; set; }
        public int? ExameApproveID { get; set; }

        public virtual ApplyMsg ApplyMsg { get; set; }
        public int? ApplyMsgID { get; set; }

        public virtual ProcessInstance ProcessInstance { get; set; }
        public int? ProcessInstanceID { get; set; }


    }

    public class ExameApprove : EntityBase
    {
        public string InvideType { get; set; }

        public List<FieldInstance> FieldInstances { get; set; }

        //public int? ParticipantID { get; set; }
        //public Employee Participant { get; set; }

        //public int? OriginID { get; set; }
        //public Employee Origin { get; set; }

        public string ResultEA { get; set; }
        public string Comments { get; set; }
        public string Approver { get; set; }
    }

     public class ApplyMsg : EntityBase
     {
         public int? ApplyerID { get; set; }
         public Employee Applyer { get; set; }

         public int? ProxyApplyerID { get; set; }
         public Employee ProxyApplyer { get; set; }

         public virtual Department Department { get; set; }
         public int? DepartmentID { get; set; }

         public virtual Role Role { get; set; }
         public int? RoleID { get; set; }

         public List<FieldInstance> FieldInstances { get; set; }
     }
}